package com.uchengwang.ui.cm_ui.cycle.viewHolder;

import android.view.View;
import android.view.ViewStub;
import android.widget.ImageView;

import com.uchengwang.R;
import com.uchengwang.ui.view.CycleVideoView;

/**
 * Created by suneee on 2016/8/16.
 */
public class VideoViewHolder extends CircleViewHolder {

    public CycleVideoView videoView;
    public ImageView video_cover, video_logo;

    public VideoViewHolder(View itemView){
        super(itemView, TYPE_VIDEO);
    }

    @Override
    public void initSubView(int viewType, ViewStub viewStub) {
        if(viewStub == null){
            throw new IllegalArgumentException("viewStub is null...");
        }

        viewStub.setLayoutResource(R.layout.viewstub_videobody);
        View subView = viewStub.inflate();

//        CycleVideoView videoBody =  subView.findViewById(R.id.videoView);
        video_cover =  subView.findViewById(R.id.video_cover);
        video_logo =  subView.findViewById(R.id.video_logo);
//        if(videoBody!=null){
//            this.videoView = videoBody;
//        }
    }
}
